﻿CREATE TABLE [dbo].[eDocumentPage] (
    [IDPage]     BIGINT        IDENTITY (1, 1) NOT NULL,
    [IDDocument] BIGINT        NOT NULL,
    [Titlu]      VARCHAR (50)  NOT NULL,
    [Descriere]  VARCHAR (100) NOT NULL,
    [NrPagina]   SMALLINT      CONSTRAINT [DF_eDocumentPage_NrPagina] DEFAULT ((0)) NOT NULL,
    [Continut]   IMAGE         NOT NULL,
    [Data]       DATETIME      CONSTRAINT [DF_eDocumentPage_Data] DEFAULT (getdate()) NOT NULL,
    CONSTRAINT [PK_eDocumentPage] PRIMARY KEY CLUSTERED ([IDPage] ASC),
    CONSTRAINT [FK_eDocumentPage_eDocumente] FOREIGN KEY ([IDDocument]) REFERENCES [dbo].[eDocumente] ([IDDocument])
);

